package com.atguigu.method;

import java.util.Arrays;

public class Exercise2{
    public static void main(String[] args){
        int[] arr = {1,2,3,4,5};
        change(arr);
        System.out.println(Arrays.toString(arr));
    }

    public static void change(int[] arr){
        arr = Arrays.copyOf(arr, arr.length*2);
        for(int i=0; i<arr.length; i++){
            arr[i] *= 2;
        }
    }
}